<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>模块管理</title>
<link rel="stylesheet" type="text/css" href="../resources/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../resources/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="../resources/agiledev/style/agiledev.css">
<link rel="stylesheet" type="text/css" href="../resources/agiledev/style/agiledev-crud.css">
<link rel="stylesheet" type="text/css" href="../resources/agiledev/style/agiledev-form.css">


<script type="text/javascript" src="../resources/easyui/jquery-1.6.min.js"></script>
<script type="text/javascript" src="../resources/agiledev/i18n/zh_CN.js"></script>
<script type="text/javascript" src="../resources/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../resources/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../resources/easyui/jquery.easyui.validation.custom.js"></script>
<script type="text/javascript" src="../resources/agiledev/jquery.ui.core.js"></script>
<script type="text/javascript" src="../resources/agiledev/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../resources/agiledev/upload.js"></script>
<script type="text/javascript" src="../resources/agiledev/form.js"></script>
<script type="text/javascript" src="../resources/agiledev/crud.js"></script>
<script type="text/javascript">
var handle = {
config:{
//	formInitUrl:'/init',
	saveUrl:'permision/create',
	updateUrl:'permision/update',
	removeUrl:'permision/remove',
	fields:[
		{
			title:'',
			checkbox:true,
			field:'uid',
			frozen:true
		},
		{
			title: '模块名称',
			width:130,
			field: 'permisionName',
			frozen: false,
			sortable: true
		},
		{
			title:'url地址',
			field:'url',
			width:130,
			frozen:false,
			sortable:false,
		},
		{
			title:'父模块',
			field:'pid',
			width:130,
			type:'radio',
			url:'permision/list?queryCondition.pid=0',
			valueField:'uid',
			textField:'permisionName',
			gridShow:false,
			frozen:false,
			sortable:false
		},
		{
			title:'父模块',
			field:'pname',
			width:130,
			frozen:false,
			sortable:false
		}
	],
	grid:{
		dataUrl:'permision/list2',
		singleSelect:false,
		idField:'uid',
		title:'模块管理'
	}
}
};
$(function(){
	$("#list").crud(handle.config);
	
	$("#btnEdit").click(function(){
		$.each(value,function(i,o){
			//$(".agiledev-edit").find(":checkbox[name='permisionId'][value='"+o+"']").attr("checked","1");
			$("[name = 'pid'][value='"+o+"']:radio").attr("checked", "checked");
		});
	});
});
</script>

</head>
<body>
<div class="list">
	<table id="list"></table>
</div>
</body>

</html>